﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;

namespace Passwords.Models
{
    public class AccentColor
    {
        public static readonly AccentColor[] SysForegroundColors = new AccentColor[]
        {
            new AccentColor("Blue",0x1ba1e2),
            new AccentColor("Teal",0x00aba9),
            new AccentColor("Red",0xe51e00),
            new AccentColor("Magenta",0xff0097),
            new AccentColor("Orange",Color.FromArgb(255,254,88,21)),
            new AccentColor("Brown",0x996600),
            new AccentColor("Pink",0xE671B5),
            new AccentColor("Purple",0xa200ff),
            new AccentColor("Lime",0x8cbf26),
            new AccentColor("Green",0x339933),
        };

        public static readonly AccentColor[] SysBackgroundColors = new AccentColor[]
        {
            new AccentColor("dark",0),
            new AccentColor("light",0xFFFFFF)

        };

        public AccentColor[] BackgroundColors { get { return AccentColor.SysBackgroundColors; } }
        public AccentColor[] AccentColors { get { return AccentColor.SysForegroundColors; } }

        public string Name { get; private set; }
        public Color Color { get; private set; }

        private AccentColor(string name, int color)
        {
            this.Name = name;

            int r = (color >> 16);
            int g = (color >> 8) & 0xff;
            int b = (color & 0xff);
            this.Color = Color.FromArgb(255, (byte)r, (byte)g, (byte)b);
        }

        private AccentColor(string name, Color color)
            : base()
        {
            this.Name = name;
            this.Color = color;
        }

        public AccentColor()
        {
        }

    }
}
